<?php if(!class_exists('raintpl')){exit;}?><!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link href="http://localhost/kpi/html/style.css" rel="stylesheet" type="text/css" media = "screen">
<link href="http://localhost/kpi/html/print.css" rel="stylesheet" type="text/css" media = "print">

</head>
<body>
<div id = "wrapper">

<div id = "container">
	<h1 class = "header">รายงานผลการประเมิน</h1>
	<br>
	<div class = "center" id = "report">
		<button class="print" onclick="javascript:window.print()">พิมพ์รายงาน</button>
		<h2>รายงานผลการประเมินตนเอง</h2>
		<?php $counter1=-1; if( isset($group) && is_array($group) && sizeof($group) ) foreach( $group as $key1 => $value1 ){ $counter1++; ?>
		<table cellpadding = "0" cellspacing = "0" border = "0" class = "list">
			<tr>
				<th colspan = "4"><?php echo $value1["name"];?></td>
			</tr>
			<?php $counter2=-1; if( isset($all_assessment) && is_array($all_assessment) && sizeof($all_assessment) ) foreach( $all_assessment as $key2 => $value2 ){ $counter2++; ?>
				<?php if( $value1["id"]==$value2["gid"] ){ ?>
					<tr>
						<td class = "topic" colspan = "2">ตัวบงชี้ <?php echo $value2["gid"];?>.<?php echo $value2["sub"];?> <?php echo $value2["name"];?></td>
					</tr>
					<tr class = "head">
						<td class = "w50">เกณฑ์มาตรฐาน</td>
						<td class = "w500">ผลการดำเนินงาน</td>
					</tr>
					<? $i = 0 ?>
					<?php $counter3=-1; if( isset($all_standard) && is_array($all_standard) && sizeof($all_standard) ) foreach( $all_standard as $key3 => $value3 ){ $counter3++; ?>
						<?php if( $value3["aid"]==$value2["id"] ){ ?>

						<? $i++; ?>
							<tr>
								<td><?php echo $i;?>).</td>
								<td><?php echo $value3["result"];?></td>
							</tr>
						<?php } ?>
					<?php } ?>
				<?php } ?>
			<?php } ?>
		</table>
		<?php } ?>
	</div>

	<div class = "clear"></div>
</div>

</div> <!-- wrapper -->

</body>
</html>